<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue</title>
</head>
<script src="vue.js"></script>
<body>

    <div id="app">
        <table border="1px">
            <thead>
                <tr>
                    <th>序号</th>
                    <th>编号</th>
                    <th>标题</th>
                </tr>
            </thead>
            <tbody>
                <tr v-for="(field,key) in news">
                    <td>{{key+1}}</td>
                    <td>{{field.id}}</td>
                    <td>{{field.title}}</td>
                </tr>
            </tbody>
        </table>
    </div>

<script>
    var app=new Vue({
        el:'#app',

        data:{
            news:[
                {id:11,title:'前端申'},
                {id:21,title:'后端君'}
            ]
        }
    });

</script>
</body>
</html>